<meta http-equiv="refresh" content="10" > 

<h3> Judge status queue </h3>
<%= stylesheet_link_tag "judge_queue" %>
<table class="run_table">
    <tr>
    <td> Run ID</td>
    <td> User </td>
    <td> Problem ID </td>
    <td> Problem Name </td>
    <td> Language </td>
    <td> Status </td>
    <td> Time </td>
    </tr>
  <% @selected_runs.each do |s| %>
    <tr>
    <td> <%= link_to s.id, :action => "show", :id => s.id %> </td>
    <td> <%= link_to s.user.login, :controller => "user", :action => "show", :id => s.user.id%> </td>
    <td> <%= s.problem.id %> </td>
    <td>  <%= link_to s.problem.name, :controller => "problems", :action => "show", :id => s.problem%> </td>
    <td> <%= s.language %> </td>
    <td> 
        <% if s.status.nil? %>
          Judging
        <% else %>
          <%= s.status %> 
        <%end%>
    </td>
    <td> <%= run_time(s.created_at) %> </td>
    </tr>
  <%end%>
</table>
<%= will_paginate @selected_runs %>

